<? 
$query = "select * from tbl_company_type";
$result = mysql_query($query);
if($_POST['cmpy_info'] == 'company_info')
{
	extract($_POST);
	$insert_query = "INSERT INTO tbl_companies (c_name,c_nickname,c_billing_address1,c_billing_address2,c_billing_city," .
			"c_billing_state,c_billing_zipcode,c_billing_country,c_phone_number,c_phone_extension,c_fax_number) " .
			"values ('$c_name','$c_nickname','$c_billing_address1','$c_billing_address2','$c_billing_city','$c_billing_state'," .
			"'$c_billing_zipcode','$c_billing_country','$c_phone_number','$c_phone_extension','$c_fax_number')";
	mysql_query($insert_query);
}
?>
<div id="accordion" style="margin-top:10px;">
<h3><a href="#section3">Company Information</a></h3>
	<div>
	<form action="index.php?page=company-mang" method="post">
		<table cellpadding="4">
			<tr>
				<td><strong>Company Name :</strong></td>
				<td><input type="text" name="c_name" /></td>
			</tr>
			<tr>
				<td><strong>Company Nickname :</strong></td>
				<td><input type="text" name="c_nickname" /></td>
			</tr>
			<tr>
				<td><strong>Company Type :</strong></td>
				<td>
				<select name="c_type">
				<? while($row = mysql_fetch_array($result)){?>
					<option value=<? echo $row['ct_id'];?>><? echo $row['ct_company'];?></option>
				<? }?>				
				</select>
				</td>
			</tr>
			<tr>
				<td><strong>Billing Address1 :</strong></td>
				<td><input type="text" name="c_billing_address1" /></td>
			</tr>
			<tr>
				<td><strong>Billing Address2 :</strong></td>
				<td><input type="text" name="c_billing_address2" /></td>
			</tr>
			<tr>
				<td><strong>City :</strong></td>
				<td><input type="text" name="c_billing_city" /></td>
			</tr>
			<tr>
				<td><strong>State :</strong></td>
				<td><input type="text" name="c_billing_state" /></td>
			</tr>
			<tr>
				<td><strong>Zip Code :</strong></td>
				<td><input type="text" name="c_billing_zipcode" /></td>
			</tr>
			<tr>
				<td><strong>Country :</strong></td>
				<td><input type="text" name="c_billing_country" /></td>
			</tr>
			<tr>
				<td><strong>Phone Number :</strong></td>
				<td><input type="text" name="c_phone_number" /></td>
			</tr>
			<tr>
				<td><strong>Extension :</strong></td>
				<td><input type="text" name="c_phone_extension" /></td>
			</tr>
			<tr>
				<td><strong>Fax Number :</strong></td>
				<td><input type="text" name="c_fax_number" /></td>
			</tr>
			<tr>
				<td>&nbsp;<input type="hidden" value="company_info" name="cmpy_info" /></td>
				<td><input type="submit" value="submit" name="submit" /></td>
			</tr>
		</table>
	</form>
	</div>
<h3><a href="#asr-rates">ASR Rates</a></h3>

<div>
	<table cellpadding="4">
		<tr>
			<td><label><strong>LEC Nickname</strong></label>:</td>
			<td>
			<select name="c_nickname">
										<option value="value1">company1</option>
										<option value="value2">company2</option>
										<option value="value3">company3</option>
										<option value="value3">company4</option>
			</select>
			</td>
		</tr>
		<tr>
			<td><label><strong>Rate Type :</label></strong></td>
			<td><select name="rt_rate_type">
										<option value="value1">company1</option>
										<option value="value2">company2</option>
										<option value="value3">company3</option>
										<option value="value3">company4</option>
									</select></td>
		</tr>
		<tr>
			<td><label><strong>Rate :</label></strong></td>
			<td><input type="text" name="asr_rate_amount" /></td>
		</tr>
		<tr>
			<td><label><strong>Effective Start Date :</label></strong></td>
			<td><input type="text" name="asr_rate_eff_start_date" /></td>
		</tr>
		<tr>
			<td><label><strong>Effective End Date :</label></strong></td>
			<td><input type="text" name="asr_rate_eff_end_date" /></td>
		</tr>
		<tr>
			<td>&nbsp;<input type="hidden" value="asr_rates" name="asr_rates" /></td>
			<td><input type="submit" value="submit" name="submit" /></td>
		</tr>
	</table>
</div>
	<h3><a href="#agency-agreement">Agency Agreement</a></h3>
	<div>
		<table cellpadding="4">
		<tr>
			<td><label><strong>LEC Nickname</strong></label>:</td>
			<td><select name="c_nickname">
										<option value="value1">company1</option>
										<option value="value2">company2</option>
										<option value="value3">company3</option>
										<option value="value3">company4</option>
									</select></td>
		</tr>
		<tr>
			<td><label><strong>Wholesale Carrier CIC Code :</label></strong></td>
			<td><select name="c_nickname">
										<option value="value1">company1</option>
										<option value="value2">company2</option>
										<option value="value3">company3</option>
										<option value="value3">company4</option>
									</select></td>
		</tr>
		<tr>
			<td><label><strong>IXC Nickname :</label></strong></td>
			<td><input type="text" name="rp_fax_number" /></td>
		</tr>
		<tr>
			<td><label><strong>Effective Start Date :</label></strong></td>
			<td><input type="text" name="rp_fax_number" /></td>
		</tr>
		<tr>
			<td><label><strong>Effective End Date :</label></strong></td>
			<td><input type="text" name="rp_fax_number" /></td>
		</tr>
		<tr>
			<td>&nbsp;</td>
			<td><input type="submit" value="submit" name="submit" /></td>
		</tr>
	</table>
	</div>

</div>

